/**
 * Created by litch on 2017/7/10.
 */
import React from 'react'
import DropDown from '../widget/drop-down'
import DropDownItem from "../widget/drop-down-item";
class NavBar extends React.Component{
    constructor(props) {
        super(props);
        this.state = {showFlg: 0x01};
    }
    render(){
        return (
            <nav className="navbar navbar-default navbar-fixed-top">
                <div className="container-fluid">
                    <div className="navbar-header">
                        <button type="button" className="navbar-toggle collapsed" data-toggle="collapse"
                                data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                            <span className="sr-only">Toggle navigation</span>
                            <span className="icon-bar"/>
                            <span className="icon-bar"/>
                            <span className="icon-bar"/>
                        </button>
                        <a className="navbar-brand" href="#">AFast</a>
                        <p className="navbar-text">后台管理系统</p>
                    </div>
                    <div className="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                        {
                            <DropDown title={this.props.username}>
                                <DropDownItem text="个人资料" to="/me"/>
                                <DropDownItem text="退出系统" to="/exit"/>
                            </DropDown>
                        }
                    </div>
                </div>
            </nav>
        );
    }
}
export default NavBar